<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="text/html;charset=utf-8">
<title>项目详情</title></head>
<link href="resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="resources/bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="resources/css/index.css" rel="stylesheet">

<body>
	<s:include value="../header-common.jsp" />
<div class="container">
	<div class="row">
		<h1 style="text-align:center;margin-top:0;">项目详情!</h1>
	</div>
	<s:set var="set" value="#{1:'关闭',2:'开启'}"></s:set>
	
	<s:form id="form" action="projectList" method="post">
	<input name="projectId" value="${projectInfo.projectId}" style="display: none;">
	<table class="table table-striped table-bordered table-hover table-condensed table-responsive">
		<tr class="success">
			<td>项目经理</td><td><s:property value="%{pm.employeeName}" /></td>
		</tr>
		<tr class="info">
			<td>项目名称</td><td><s:property value="%{projectInfo.projectName}"/></td>
		</tr>
		<tr class="warning">
			<td>项目状态</td><td><s:property value="#set[projectInfo.projectStatus]" /></td>
		</tr>
		<tr class="primary">
			<td>项目描述</td><td><s:property value="%{projectInfo.projectDescription}"/></td>
		</tr>
		<tr class="info">
			<td>项目测试员</td><td>
				<s:iterator value="testEmployee"><s:property value="value"></s:property>&nbsp;&nbsp;</s:iterator>
			</td>
		</tr>
		<tr class="info">
			<td>项目开发员</td><td>
				<s:iterator value="workEmployee"><s:property value="value"></s:property>&nbsp;&nbsp;</s:iterator>
			</td>
		</tr>
		<tr class="primary">
			<td>创建时间</td><td><s:date name="%{projectInfo.createTime}" format="yyyy年MM月dd日 HH时mm分ss秒"/></td>
		</tr>
	</table>
	<div class="col-xs-12">
		<div class="btn-group btn-group-justified">
				<s:if test='user.role eq "系统管理员"'>
					<s:if test="projectInfo.projectStatus == 1">
					<a class="btn btn-primary"><button type="button" onclick="openOrClose()"
						style="width:100%;background:none;border:0;margin:0;padding:0;">开启项目</button></a>
					</s:if>
					<s:if test="projectInfo.projectStatus == 2">
					<a class="btn btn-primary"><button type="button" onclick="openOrClose()"
						style="width:100%;background:none;border:0;margin:0;padding:0;">关闭项目</button></a>
					</s:if>
					
					<a class="btn btn-primary"><button type="submit" onclick="updateProject();"
						style="width:100%;background:none;border:0;margin:0;padding:0;">修改项目</button></a>
					<a class="btn btn-primary"><button type="submit" onclick="deleteProject()"
						style="width:100%;background:none;border:0;margin:0;padding:0;">删除项目</button></a>
				</s:if>
			<a href="playerList.do?projectId=${projectInfo.projectId }" class="btn btn-primary">成员列表</a>
			<a href="projectList.do" class="btn btn-primary">项目列表</a>
			<s:if test='user.role eq "测试员" && projectInfo.projectStatus == 2'>
				<a href="addProblem.do" class="btn btn-primary">新增问题</a>
			</s:if>
		</div>
	</div>
	</s:form>
</div>
	<script src="resources/bootstrap/js/jquery.min.js"></script>
	<script src="resources/bootstrap/js/bootstrap.min.js"></script>
	<script src="resources/js/common.js"></script>
</body>
</html>
